package tools;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

/**
 * Classe de test de la classe GestionFautes
 * @author Kevin Pozderec,Faycal Abka
 *
 */
public class TestGestionFautes {


	@Test
	public void testGestionFaute_OK() {
		StringBuffer exp = new StringBuffer();
		exp.append("<methodResponse><fault><value><struct>");			
		exp.append("<member><name>faultCode</name><value><int>"+18+"</int></value></member>");
		exp.append("<member><name>faultString</name><value>chaineErreur</value></member>");		
		exp.append("</struct></value></fault></methodResponse>");
		String expected = exp.toString();
		
		assertTrue(expected.equals(GestionFautes.creerRetourErreur("chaineErreur",18)));
		
	}

}
